<div class="span12">
    <div class="box gradient">
        <div class="title">
            <h4>
                <span>Information</span>
            </h4>
        </div>
        <div class="content noPad clearfix">
            <table style="width: 100%">
                <tbody>
                    <tr>
                        <td style="width: 15%">
                            <label>Date:</label>
                            <span> {{reglement.date|date('d/m/Y')}}</span>
                        </td>
                        <td style="width: 15%">
                            <label>Heure:</label>
                            <span> {{reglement.getTime}}</span>
                        </td>
                        <td style="width: 15%">
                            <label>Client:</label>
                            <span>{{reglement.client}}</span>
                        </td>
                        <td style="width: 15%">
                            <label>Reference:</label>
                            <span>{{reglement.reference}}</span>
                        </td>
                        
                        <td style="width: 40%">
                            <label>Utilisateur:</label>
                            <span>{{reglement.user}}</span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div> 
    </div>
</div>
<div class="span12"  style="margin-left:0">
    <div class="box">

        <div class="title">

            <h4>
                <span class="icon16 brocco-icon-grid"></span>
            </h4>
            <a style="display: block;" href="#" class="minimize">Minimize</a>
        </div>
        <div style="display: block;" class="content noPad">
            <table class="responsive table table-bordered">
                <thead>
                    <tr>
                        <th style="width:3%">N°</th>
                        <th style="width:15%">Type</th>
                        <th style="width:30%">Montant</th>
                        <th>Numero Piece</th>
                        <th style="width:7%">Compte Bancaire</th>
                        <th style="width:10%">Date Echeance</th>
                        <th>Document</th>
                        <th style="width:5%">etat</th>
                    </tr>
                </thead>
                 <tbody>
                    {% for i,ligne in reglement.lignes %}
                        <tr>
                            <td>{{i+1}}</td>
                            <td>{{ligne.type}}</td>
                            <td>{{ligne.montant}}</td>
                            {% if ligne.type!='Espece' %}
                            <td>{{ligne.numeroPiece}}</td>
                            <td>{{ligne.compteBancaire}}</td>
                            <td>{{ligne.dateEcheance|date('d/m/Y')}}</td>
                            {% else %}
                            <td>-</td>
                            <td>-</td>
                            <td>-</td>
                            {% endif %}
                            {% if ligne.facture %}
                            <td>Facture :{{ligne.facture}}</td>
                            {% elseif ligne.bonLivraison %}
                            <td>Bon Livraison :{{ligne.bonLivraison}}</td>
                            {% endif %}
                            <td>{{ligne.etat}}</td>
                            
                        </tr>
                    {% endfor %}
                    </tbody>
                </table>
            </div>
        </div>
        
    </div>
<div class="span2" style="margin-right: 0">
    <table>
        <tr>
            <td><input style="width:100px" type="button" class="btn btn-info cut-icon-previous"  value="Retour" onclick="retourListeReglement()"></td>
        </tr>
        <tr>
            <td style="height: 20px"></td>
        </tr>
        <tr>
            <td><input style="width: 100px" type="button" class="btn btn-info cut-icon-previous"  value="Imprimer" onclick=""></td>
        </tr>
    </table>
</div>

<script>
    function retourListeReglement(){
        $.ajax({
        url: "{{ path('gds_vente_liste_reglement') }}",
            data: 'retour=true'+'&numero='+lf[0]+'&client='+lf[1]+'&date1='+lf[2]+'&date2='+lf[3]+'&heure1='+lf[4]+'&heure2='+lf[5]
                    +'&ref_b='+lf[6]+'&ref_f='+lf[7]+'&ttc1='+lf[8]+'&ttc2='+lf[9]+'&is_cloture='+lf[10],
            success: function(data) {
                $('#div_liste_reglement').replaceWith(data)
                $('#filtre_numero').val(lf[0])
                $('#client').val(lf[1])
                $('#filtre_date1').val(lf[2])
                $('#filtre_date2').val(lf[3])
                $('#filtre_ref_b').val(lf[6])
                $('#filtre_ref_f').val(lf[7])
                $('#filtre_ttc1').val(lf[8])
                $('#filtre_ttc2').val(lf[9])
            }
        })
    }
</script>